<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.hz.model.Activity"%>
<%@page import="com.hz.util.ParamUtil"%>
<%@page import="com.hz.control.ActivityControl"%>
<%@page import="com.hz.model.ApplyAct"%>
<%@page import="com.hz.control.ApplyActControl"%>
<%@page import="com.hz.model.User"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>My JSP 'index.jsp' starting page</title>
  </head>
  
  <body>
  <%
       request.setCharacterEncoding("utf-8");
      User  cu=(User)session.getAttribute("user");
  
       ApplyAct a = (ApplyAct)session.getAttribute("AppAct");
       a.setProcedure(request.getParameter("content1"));
       
       if(ApplyActControl.insertApplyAct(a)){
    	   session.removeAttribute("AppAct");
       %>
       <script>
       alert("成功提出申请");
       window.location.href="ApplyActivities.jsp"
       </script>
       <%
       
       }else{
   %>
   <script>
       alert("提出申请失败!");
       history.go(-1);
       </script>
       <%} %>
  </body>
</html>
